#pragma once

class UnitStats
{
	
	int _mp;
	int _hp;
	int _data;

public:
	void addMp(int amount, int total)
	{
		_mp += amount;
		if (_mp > total)
		{
			_mp = total;
		}
	}
	void addHp(int amount, int total)
	{
		_hp += amount;
		if (_hp > total)
		{
			_hp = total;
		}
	}
	int getMp()
	{
		if (_mp < 0){return 0;}
		else
		return _mp;
	}
	int getHp()
	{
		if (_hp < 0){return 0;}
		else
		return _hp;
	}

	//void DamageHp();

	UnitStats * getCopy()
	{
		return new UnitStats(_hp,_mp,_data);
	}

	UnitStats(int hp,int mp, int s)
	{
		_hp = hp;
		_data = s;
		_mp = mp;
	}
};
